package cate.game.play.vo;

import cate.common.table.d.GDPlay;
import cate.game.play.fighter.FightAttrGroup;
import cate.game.play.fighter.PetFighter;
import com.fasterxml.jackson.annotation.JsonInclude;
import easy.java.dev.note.NoteField;

import java.util.Set;

public class PetFighterVO {

	@NoteField("战斗对象的剧本临时ID")
	public int pid;

	@NoteField("英雄属性组")
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public FightAttrGroup attr;

	@NoteField("英雄技能")
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public Set<Integer> skill;

	public PetFighterVO read(PetFighter fighter) {
		this.pid = fighter.getPid();
		if (GDPlay.ENABLE_PLAY_DETAIL) {
			this.attr = fighter.attr;
			this.skill = fighter.skill.getSkillTids();
		}
		return this;
	}
}
